home *** CD-ROM | disk | FTP | other *** search
Java Source | 1999-05-28 | 1.2 KB | 44 lines | [TEXT/CWIE] |
- /*
- * @(#)DebugGraphicsObserver.java 1.6 98/08/26
- *
- * Copyright 1997, 1998 by Sun Microsystems, Inc.,
- * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
- * All rights reserved.
- *
- * This software is the confidential and proprietary information
- * of Sun Microsystems, Inc. ("Confidential Information"). You
- * shall not disclose such Confidential Information and shall use
- * it only in accordance with the terms of the license agreement
- * you entered into with Sun.
- */
-
- package javax.swing;
-
- import java.awt.*;
- import java.awt.image.*;
-
- /** ImageObserver for DebugGraphics, used for images only.
- *
- * @version 1.6 08/26/98
- * @author Dave Karlton
- */
- class DebugGraphicsObserver implements ImageObserver {
- int lastInfo;
-
- synchronized boolean allBitsPresent() {
- return (lastInfo & ImageObserver.ALLBITS) != 0;
- }
-
- synchronized boolean imageHasProblem() {
- return ((lastInfo & ImageObserver.ERROR) != 0 ||
- (lastInfo & ImageObserver.ABORT) != 0);
- }
-
- public synchronized boolean imageUpdate(Image img, int infoflags,
- int x, int y,
- int width, int height) {
- lastInfo = infoflags;
- return true;
- }
- }
-